wait_fix
authorAlastair McKinstry <mckinstry@debian.org>
Fri, 21 Oct 2016 18:01:25 +0000 (18:01 +0000)
committerAlastair McKinstry <mckinstry@debian.org>
Fri, 21 Oct 2016 18:01:25 +0000 (18:01 +0000)
commita9951d475d8ade49395e47741f8879cc052c82d5
tree5ddace0bffd8a1be1dab18e47d47e954dabdc749
parentbb8e98a3d5f5ecda094d65d21f034f4a7410ae15
wait_fix

From f807f1e7e6e54209be06997ab1d1dd2f919f99a7 Mon Sep 17 00:00:00 2001
From: Gilles Gouaillardet <gilles@rist.or.jp>
Date: Wed, 7 Sep 2016 08:49:20 +0900
Subject: [PATCH] threads: fix WAIT_SYNC_INIT with a zero count

WAIT_SYNC_INIT(sync,0); WAIT_SYNC_RELEASE(sync);
hanged because sync->signaled was initialised to true, and
there is no reason to invoke WAIT_SYNC_SIGNALED(sync) before
WAIT_SYNC_RELEASE(sync)
this commit initializes sync->signaled to true unless the count is zero.

Thanks George for the review and guidance.

(cherry picked from commit open-mpi/ompi@44a66e208c5771e0897bcf27430a3afa171ba4c2)

Gbp-Pq: Name wait_fix.patch
opal/threads/wait_sync.h